home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINPROGS
/
WPJV1N5.ZIP
/
WINSTUB.ZIP
/
WINSTUB.CPP
next >
Wrap
C/C++ Source or Header
|
1993-04-29
|
655b
|
29 lines
// Enhanced WINSTUB.EXE for Windows applications
#include <process.h>
#include <stddef.h>
#include <iostream.h>
char answer;
int returncode;
int main(void)
{
cerr << "\nThis program requires Microsoft Windows to run.";
cerr << "\nWould you like me to start Microsoft Windows for you? ";
cin >> answer;
if (answer == 'y' || answer == 'Y')
{
returncode = spawnlp(P_WAIT,"win.com","","address",NULL);
if (returncode<0)
{
cerr << "\n\nError, could not start Microsoft Windows.";
cerr << "\nExiting back to DOS...";
}
}
else
cerr << "\n\nExiting back to DOS...";
return returncode;
}